package tij4.ch17;

public class SerialNumberGenerator
{
	private static volatile int serialNumber = 0;

//   safe way	
//	public synchronized static int nextSerialNumber()
//	{
//		return serialNumber++;
//	}
	
	public  static int nextSerialNumber()
	{
		return serialNumber++;
	}
	
}
